Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

data-sort

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-sort

Data engine is small data management lib for some sort and filter.

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

SORT

Creating new Sort

    const sort = new Sort(data);
    const sort2 = new Sort(data, 'Primary key');
    const sort3 = new Sort(data, 'Primary key', CustomSortFunction);

Updating data

    // This line will resort data.
    const data = sort.updateData(newData);
    // this line will return data as is.
    const data2 = sort.updateData(newData, false);

Updating criteria

    sort.setSortFunction(CustomFunction);
    sort.SortFunction = CustomFunction;
    sort.setPrimaryKey('new key');
    sort.PrimaryKey = 'new key';

Removing criteria

    sort.removePrimaryKey();
    sort.setDefaultSort();

Sorting data

    const data = sort.sortBy('name');

Getting data

    const data = sort.getData();

Resorting data

    const data = sort.sortData();

WHAT NEXT

Add promise like for big data!

Keywords

FAQs

Package last updated on 07 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc